class TagsController < ApplicationController
before_filter :authorize
layout "page"
	def index
		@tags = Article.tag_counts(:order => 'name')
	end
	def show

      
   per_page = 10


      @articles = Article.find_tagged_with(params[:id])
      @articles_pages, @articles = paginate(Article, {:conditions => ['tags.name = ? and published = true', params[:id]],:include => [:tags]  ,:order => 'published_at DESC', :per_page => per_page})

 	end
 	

end
